
#ifndef __STACK_POOL_H__
#define __STACK_POOL_H__

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

typedef struct fg_lfnode_
{
    int in_use;
    int id;
    void* data;
    struct fg_lfnode_ * next;
} FG_LFNODE;

typedef struct fg_lfpool_
{
    unsigned int size;
    FG_LFNODE * head;
} FG_LFPOOL;

FG_LFPOOL* fg_lfpool_new();

int fg_lfpool_add(FG_LFPOOL* pool, void* data);

void* fg_lfpool_take_data(FG_LFPOOL* pool);

int fg_lfpool_putback_data(FG_LFPOOL* pool, void* data);

int fg_lfpool_opt_size();


#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif  // #ifndef __STACK_POOL_H__
